# -*- coding: utf-8 -*-
"""
Created on Thu Jul  4 14:57:09 2024

@author: YANCL
"""

import cv2
import numpy as np

input_img = cv2.imread("A3_二值形态学\\photo\\jjj.png", cv2.IMREAD_UNCHANGED)
kernel = np.ones((5,5), np.uint8)       #使用的卷积核
erode_img = cv2.erode(input_img, kernel, iterations = 3)    #腐蚀 2次

cv2.imshow("Original", input_img)   #显示原始图像
cv2.imshow("fushi", erode_img)      #显示腐蚀图像

cv2.waitKey()
cv2.destroyAllWindows()